package com.zmx.patientend.adapter;

import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.wang.adapters.adapter.BaseAdapterRvList;
import com.wang.adapters.base.BaseViewHolder;
import com.zmx.patientend.R;
import com.zmx.patientend.pojo.ArchivesDetails;
import com.zmx.patientend.pojo.CaseManagement;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 程序猿：胖胖祥
 * 时 间：2020/12/8  13:36
 * 功 能：
 */
public class CaseManagementAdapter extends BaseAdapterRvList<CaseManagementAdapter.ViewHolder, ArchivesDetails> {


    public CaseManagementAdapter(Activity activity) {
        super(activity);
    }

    @Override
    protected void onBindVH(ViewHolder holder, int listPosition, ArchivesDetails caseManagement) {

        holder.text1.setText("就诊时间："+caseManagement.getAsktime());
        holder.text2.setText("诊断记录："+caseManagement.getContent());
        holder.text3.setText("上传时间："+caseManagement.getAddtime());

    }

    @NonNull
    @Override
    protected ViewHolder onCreateVH(ViewGroup parent, LayoutInflater inflater) {

        CaseManagementAdapter.ViewHolder holder = new CaseManagementAdapter.ViewHolder(inflater.inflate(R.layout.adapter_case_management, parent, false));
        return holder;
    }

    static class ViewHolder extends BaseViewHolder {

        @BindView(R.id.text1)
        TextView text1;
        @BindView(R.id.text2)
        TextView text2;
        @BindView(R.id.text3)
        TextView text3;

        ViewHolder(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }

    }


}
